using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;


namespace Planisoft.DAO.Mapping
{
    public class UbigeoDepartamentoMap : EntityTypeConfiguration<UbigeoDepartamento>
    {
        public UbigeoDepartamentoMap()
        {
            // Primary Key
            this.HasKey(t => t.idUbiDpto);

            // Properties
            this.Property(t => t.CodPdtUbiDpto)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("UbigeoDepartamento");
            this.Property(t => t.idUbiDpto).HasColumnName("idUbiDpto");
            this.Property(t => t.CodPdtUbiDpto).HasColumnName("CodPdtUbiDpto");
            this.Property(t => t.DescUbiDpto).HasColumnName("DescUbiDpto");
        }
    }
}
